
*Purpose: final cleaning for the teacher endline survey: variable names/labels/inconcistencies
*Last date modified: 16 April 2019

clear all
set more off

use "[directory]\teacher_endline_preclean.dta"


*Section I. Teacher and School Identification
***********************************
*gender_200
label variable gender_200 "200_What's the teacher's gender?"
notes replace gender_200 in 1: "200_What's the teacher's gender?"
la def gender_200 1 "Female " 0 "Male"
la val gender_200 gender_200

*
foreach var in class_level_112_e class_level_112_1_e class_level_112_2_e class_level_112_3_e class_level_112_4_e class_level_112_5_e class_level_112_6_e class_level_112_7_e{
la var `var' "112. In which levels/classes do you teach entrepreneurship course?"
}

rename (class_level_112_1_e class_level_112_2_e class_level_112_3_e class_level_112_4_e class_level_112_5_e class_level_112_6_e class_level_112_7_e)(class_level_112_S1_e class_level_112_S2_e class_level_112_S3_e class_level_112_S4_e class_level_112_S5_e class_level_112_S6_e class_level_112_na7_e)

foreach var in class_level_112_S1_e class_level_112_S2_e class_level_112_S3_e class_level_112_S4_e class_level_112_S5_e class_level_112_S6_e class_level_112_na7_e{
la val `var' yesnolbl
}

*baseline_112_e
la val baseline_112_e yesnolbl

*Section 2. Teacher Experience and Training
********************************************
*age_201
label variable age_201 "201. What is your age?"
notes replace age_201 in 1: "201. What is your age?"

*qual_203
label variable qual_203 "203. What type of teacher are you?"
la def qual_203 1 "Qualified teacher (you studied Education)" ///
				2 "Unqualified teacher (you did NOT study Education) but trained on pedagogy" ///
				3 "Unqualified teacher (you did NOT study Education) but and not trained on pedagogy" ///
				4 "Internee"
label values qual_203 qual_203
notes replace qual_203 in 1: "203. What type of teacher are you?"

*year_start_202_e
label variable year_start_202_e "202. For how many years have you taught entrepreneurship?"
notes replace year_start_202_e in 1: "202. For how many years have you taught entrepreneurship?"

*student_number_203_e
label variable student_number_203_e "203. How many S6 or S4 entrepreneurship students do you teach in total?"
notes replace student_number_203_e in 1: "203. How many S6 or S4 entrepreneurship students do you teach in total?"

*malestud_212
label variable malestud_212 "212.a Number of male student?"
notes replace malestud_212 in 1: "212.a Number of male student?"

*femalestud_212
label variable femalestud_212 "212.b Number of female student?"
notes replace femalestud_212 in 1: "212.b Number of female student?"

*devide_class_204_e
label variable devide_class_204_e "204. For the above class, is the class divided into more than 1 stream?"
notes replace devide_class_204_e in 1: "204. For the above class, is the class divided into more than 1 stream?"

*traincurr_220
label variable traincurr_220 "220. Have you ever attended a training specifically focused on the competency-ba"
notes replace traincurr_220 in 1: "220. Have you ever attended a training specifically focused on the competency-based entrepreneurship curriculum?"
la val traincurr_220 yesnolbl

*fromwhom_210_e
rename (fromwhom_210_1_e fromwhom_210_2_e fromwhom_210_3_e fromwhom_210_4_e)(fromwhom_210_1_reb fromwhom_210_2_educate fromwhom_210_3_reb_educate fromwhom_210_4_other_NGO)
foreach var in fromwhom_210_1_reb fromwhom_210_2_educate fromwhom_210_3_reb_educate fromwhom_210_4_other_NGO{
la var `var' "210. From whom?" 
la val `var' yesnolbl
}

*fromwhom_213_e
rename (fromwhom_213_1_e fromwhom_213_2_e fromwhom_213_3_e fromwhom_213_4_e)(fromwhom_213_1_reb fromwhom_213_2_educate fromwhom_213_3_reb_educate fromwhom_213_4_other_NGO)
foreach var in fromwhom_213_1_reb fromwhom_213_2_educate fromwhom_213_3_reb_educate fromwhom_213_4_other_NGO{
la var `var' "213. From whom?"
la val `var' yesnolbl
}

*fromwhom_215_e
rename fromwhom_215 fromwhom_215_e
rename (fromwhom_215_1 fromwhom_215_2 fromwhom_215_3 fromwhom_215_4)(fromwhom_215_1_reb fromwhom_215_2_educate fromwhom_215_3_reb_educate fromwhom_215_4_other_NGO)
foreach var in fromwhom_215_1_reb fromwhom_215_2_educate fromwhom_215_3_reb_educate fromwhom_215_4_other_NGO{
la var `var' "215. From whom?"
la val `var' yesnolbl
}


*Section 4. Curricular Knowledge and Perceptions 
************************************************
*obstrain_222_e
label variable obstrain_222_e "222.a. Have you observed another teacher conduct a lesson in the last 2 terms?"
notes replace obstrain_222_e in 1: "222.a. Have you observed another teacher conduct a lesson in the last 2 terms?"
la def obstrain_222_e 1 "Yes" 0 "No"
la val obstrain_222_e obstrain_222_e

*nbrobstrain_222_e
label variable nbrobstrain_222_e "222.b. How many did you observe?"
notes replace nbrobstrain_222_e in 1: "222.b. How many did you observe?"

*othobstrain_223_e
label variable othobstrain_223_e "223.a. Has another teacher observed you teach a lesson in the last 2 terms?"
notes replace othobstrain_223_e in 1: "223.a. Has another teacher observed you teach a lesson in the last 2 terms?"
la def othobstrain_223_e 1 "Yes" 0 "No"
la val othobstrain_223_e othobstrain_223_e

*nbrobstrain_222_e
label variable nbrothobstrain_223_e "222.3. How many observed you? "
notes replace nbrothobstrain_223_e in 1: "223.b. How many observed you? "

*writtentr_224
label variable writtentr_224 "224. Do you have a written entrepreneurship lesson plan?"
notes replace writtentr_224 in 1: "224. Do you have a written entrepreneurship lesson plan?"
la def writtentr_224 1 "No" 2 "Yes and did not show it" 3 "Yes, showed it"
la val writtentr_224 writtentr_224

*writtlesso_225
label variable writtlesso_225 "225. Do you have written lesson notes for today’s lesson? If you are not giving a lesson today, do you have written lesson notes for your most recent entrepreneurship lesson?"
notes replace writtlesso_225 in 1: "225. Do you have written lesson notes for today’s lesson? If you are not giving a lesson today, do you have written lesson notes for your most recent entrepreneurship lesson?"
la def writtlesso_225 1 "No" 2 "Yes and did not show it" 3 "Yes, showed it"
la val writtlesso_225 writtlesso_225


*def_skilllab_315
label variable def_skilllab_315 "315. What is the definition of Skills Lab?"
notes replace def_skilllab_315 in 1: "315. What is the definition of Skills Lab? Free response! Enumerator, please don't read."
la def def_skilllab_315 1 "A time after classes for students to do activities" ///
2 "A special lesson during the regular entrepreneurship lesson time for students to complete practical learning activities" ///
3 "A laboratory session for science students" ///
4 "A time for students to start student business clubs and administer their business activities" ///
5 "Do not know"
la val def_skilllab_315 def_skilllab_315

*def_skilllab_315
notes replace skills_lab_def_411_e in 1: "411. What is the definition of Skills Lab? Please read multiple choice answers"

*mrktskl_400
label variable mrktskl_400 "400. How should students apply marketing skills in their school business club?"
notes replace mrktskl_400 in 1: "400. How should students apply marketing skills in their school business club?"

foreach var in mrktskl_400_DevProBrand mrktskl_400_Advert mrktskl_400_KeepingAccount mrktskl_400_BusinessReg mrktskl_400_VerbalProm{
la var `var' "400. How should students apply marketing skills in their school business club?"
notes replace `var' in 1: "400. How should students apply marketing skills in their school business club?
la val `var' yesnolbl
}
drop appl_skillslab_stu_413_6_e appl_skillslab_stu_413_other_e
rename appl_skillab_stu_413_spec_oth_e mrktskl_400_other
label variable mrktskl_400_other "400. How should students apply marketing skills in their school business club?"
notes mrktskl_400_other: "400. How should students apply marketing skills in their school business club?"

*mrktskl_400
label variable busplnskl_401 "401. What should be included in a student’s business plan?"
notes replace busplnskl_401 in 1: "401. What should be included in a student’s business plan?"
drop busplnskl_401_Other_e
rename busplnskl_401_Other_specify_e busplnskl_401_other
notes busplnskl_401_other: "401. What should be included in a student’s business plan?"

foreach var in busplnskl_401_BusiName busplnskl_401_ReceiFromSales busplnskl_401_MarketgPlan busplnskl_401_PandLStatemt busplnskl_401_Audit{
la var `var' "401. What should be included in a student’s business plan?"
notes replace `var' in 1: "401. What should be included in a student’s business plan?"
la val `var' yesnolbl
}

*balenc_sheet_415_e
rename (balenc_sheet_415_1_e balenc_sheet_415_2_e balenc_sheet_415_3_e balenc_sheet_415_4_e balenc_sheet_415_5_e balenc_sheet_415_6_e balenc_sheet_415_7_e)(balenc_sheet_415_e_profits balenc_sheet_415_e_assets balenc_sheet_415_e_liablties balenc_sheet_415_e_marktplan balenc_sheet_415_e_capital balenc_sheet_415_e_totsales balenc_sheet_415_e_other)
foreach var in balenc_sheet_415_e_profits balenc_sheet_415_e_assets balenc_sheet_415_e_liablties balenc_sheet_415_e_marktplan balenc_sheet_415_e_capital balenc_sheet_415_e_totsales balenc_sheet_415_e_other{
la val `var' yesnolbl
}

*empr_my_skills_418_e
label variable empr_my_skills_418_e "418. Teaching the entrepreneurship course under the new competency-based curricu"
notes replace empr_my_skills_418_e in 1: "418. Teaching the entrepreneurship course under the new competency-based curriculum has improved my skills as a teacher"

*empr_learner_skills_419_e
label variable empr_learner_skills_419_e "419. The entrepreneurship course under the new competency-based curriculum impro"
notes replace empr_learner_skills_419_e in 1: "419. The entrepreneurship course under the new competency-based curriculum improves the skills of learners"

*entr_2015_420_e
label variable entr_2015_420_e "420. Did you teach entrepreneurship under the previous knowledge-based curriculu"
notes replace entr_2015_420_e in 1: "420. Did you teach entrepreneurship under the previous knowledge-based curriculum (2015 or earlier)?"

*new_vs_old_421_e
label variable new_vs_old_421_e "421. I enjoy teaching the entrepreneurship course under the new competency-based"
notes replace new_vs_old_421_e in 1: "421. I enjoy teaching the entrepreneurship course under the new competency-based curriculum more than I enjoyed teaching the previous knowledge-based entrepreneurship curriculum."

*skills_uneder_new_422_e
label variable skills_uneder_new_422_e "422. My skills as a teacher have improved more under the new competency-based cu"
notes replace skills_uneder_new_422_e in 1: "422. My skills as a teacher have improved more under the new competency-based curriculum than under the previous knowledge-based curriculum."

*lear_better_new_423_e
label variable lear_better_new_423_e "423. Learners develop better entrepreneurship skills under the new competency-ba"
notes replace lear_better_new_423_e in 1: "423. Learners develop better entrepreneurship skills under the new competency-based curriculum than under the previous knowledge-based curriculum."

*lern_pass_better_424_e
label variable lern_pass_better_424_e "424. Learners prepare for and pass exams better under the competency-based entre"
notes replace lern_pass_better_424_e in 1: "424. Learners prepare for and pass exams better under the competency-based entrepreneurship course than under the previous knowledge-based curriculum."

*meth_300
label variable meth_300 "300. What are the teaching methods or pedagogies that you are most comfortable u"
notes replace meth_300 in 1: "300. What are the teaching methods or pedagogies that you are most comfortable using? Please rank them"

foreach var in meth_300_mostcomf_Lect meth_300_mostcomf_QandA meth_300_mostcomf_Quiz meth_300_mostcomf_GroupWork meth_300_mostcomf_Games meth_300_mostcomf_Discussion meth_300_mostcomf_ActOutClass meth_300_mostcomf_ReadFromText meth_300_mostcomf_PracticeEx meth_300_mostcomf_Research meth_300_mostcomf_Experiment meth_300_mostcomf_Portfolio{
la var `var' "300. What are the teaching methods or pedagogies that you are most comfortable using? Please rank them"
la val `var' yesnolbl
notes replace `var' in 1: "300. What are the teaching methods or pedagogies that you are most comfortable using? Please rank them"
}


*Section  5. Teacher Income and Job Satisfaction 
************************************************

*othoccup_600
label variable othoccup_600 "600_Aside from teaching, are you engaged in any other occupations to earn extra "
notes replace othoccup_600 in 1: "600_Aside from teaching, are you engaged in any other occupations to earn extra income?"
la def othoccup_600 1 "Yes" 0 "No"
la val othoccup_600 othoccup_600


*othoccup_600
label variable hrsothoccup_601 "601_In the last week, how many hours did you spend on these other occupations on average?"
notes replace hrsothoccup_601 in 1: "601_In the last week, how many hours did you spend on these other occupations on average?"
*la def hrsothoccup_601 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
*la val hrsothoccup_601 hrsothoccup_601

*point1_606
label variable point1_606 "606_1_Salary/Income"
notes replace point1_606 in 1: "606_1_Salary/Income"
la def point1_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point1_606 point1_606

*point2_606
label variable point2_606 "606_2_Workload"
notes replace point2_606 in 1: "606_2_Workload"
la def point2_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val  point2_606 point2_606

*point3_606
label variable point3_606 "606_3_Current posting"
notes replace point3_606 in 1: "606_3_Current posting"
la def point3_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point3_606 point3_606

*point4_606
label variable point4_606 "606_4_Job security"
notes replace point4_606 in 1: "606_4_Job security"
la def point4_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point4_606 point4_606

*point5_606
label variable point5_606 "606_5_Appreciation from parents/students"
notes replace point5_606 in 1: "606_5_Appreciation from parents/students"
la def point5_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point5_606 point5_606 

*point6_606
label variable point6_606 "606_6_Social status in the community"
notes replace point6_606 in 1: "606_6_Social status in the community"
la def point6_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point6_606 point6_606

*point7_606
label variable point7_606 "606_7_Work environment"
notes replace point7_606 in 1: "606_7_Work environment"
la def point7_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point7_606 point7_606 

*point8_606
label variable point8_606 "606_8_Support/guidance from govt./management for becoming a better teacher"
notes replace point8_606 in 1: "606_8_Support/guidance from govt./management for becoming a better teacher"
la def point8_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point8_606 point8_606 

*point9_606
label variable point9_606 "606_9_Overall job satisfaction"
notes replace point9_606 in 1: "606_9_Overall job satisfaction"
la def point9_606 1 "Very dissatisfied" 2 "Dissatisfied" 3 "Satisfied" 4 "Very satisfied" 
la val point9_606 point9_606


//adding some corrections as per the Todd's email

replace schoolid = 403031 if key == "uuid:4ce9dbfe-451f-4a19-ad09-8fca841eb0f0" 
replace reenter_schoolid = 403031 if key == "uuid:4ce9dbfe-451f-4a19-ad09-8fca841eb0f0"

replace schoolid = 402116 if key == "uuid:89dbfed5-c922-4066-875b-260d18bfc099" 
replace reenter_schoolid = 402116 if key == "uuid:89dbfed5-c922-4066-875b-260d18bfc099"

replace reenter_teacherid = 5040302 if key == "uuid:367a5991-bfc3-4c02-aeed-3c7207051843"

replace schoolid = 503204 if key == "uuid:9971195e-a787-4973-bb21-0b413827980f" 
replace reenter_schoolid = 503204 if key == "uuid:9971195e-a787-4973-bb21-0b413827980f"
replace schoolid = 503204 if key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea" 
replace reenter_schoolid = 503204 if key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"

//to correct an error that was made in assigning endline teacherids
replace uniqueid = "3051351" if uniqueid == "3051352" & key == "uuid:7cf4b4f2-19b2-4bae-b462-173000f23319"
replace teacherid = 3051351 if teacherid == 3051352 & key == "uuid:7cf4b4f2-19b2-4bae-b462-173000f23319"
replace reenter_teacherid = 3051351 if reenter_teacherid == 3051352 & key == "uuid:7cf4b4f2-19b2-4bae-b462-173000f23319"

//changed to match the endline teacherid creation protocol
replace uniqueid = "3051352" if uniqueid == "3051353" & key == "uuid:21ebba5c-0893-4862-9ac1-7e2c8415555a"
replace teacherid = 3051352 if teacherid == 3051353 & key == "uuid:21ebba5c-0893-4862-9ac1-7e2c8415555a"
replace reenter_teacherid = 3051352 if reenter_teacherid == 3051353 & key == "uuid:21ebba5c-0893-4862-9ac1-7e2c8415555a"

//edited to match the endline teacherid creation protocol
replace uniqueid = "4021111" if uniqueid == "4021112" & key == "uuid:7f94f9b9-07e0-4301-87b7-292a4e1556bd"
replace teacherid = 4021111 if teacherid == 4021112 & key == "uuid:7f94f9b9-07e0-4301-87b7-292a4e1556bd"
replace reenter_teacherid = 4021111 if reenter_teacherid == 4021112 & key == "uuid:7f94f9b9-07e0-4301-87b7-292a4e1556bd"

//corrected to match the endline teacherid creation protocol
replace uniqueid = "4021112" if uniqueid == "4021113" & key == "uuid:92017b00-9b31-46e9-b94f-8015569594bd"
replace teacherid = 4021112 if teacherid == 4021113 & key == "uuid:92017b00-9b31-46e9-b94f-8015569594bd"
replace reenter_teacherid = 4021112 if reenter_teacherid == 4021113 & key == "uuid:92017b00-9b31-46e9-b94f-8015569594bd"

//corrected to match the endline teacherid creation protocol
replace uniqueid = "4030501" if uniqueid == "4030502" & key == "uuid:5e170511-b44b-4ad3-b4d7-84abce6ef078"
replace teacherid = 4030501 if teacherid == 4030502 & key == "uuid:5e170511-b44b-4ad3-b4d7-84abce6ef078"
replace reenter_teacherid = 4030501 if reenter_teacherid == 4030502 & key == "uuid:5e170511-b44b-4ad3-b4d7-84abce6ef078"


//corrected to match the endline teacherid creation protocol
replace uniqueid = "5030561" if uniqueid == "5030562" & key == "uuid:0c719191-3786-4ca2-ab0c-a2ad5d700a2e"
replace teacherid = 5030561 if teacherid == 5030562 & key == "uuid:0c719191-3786-4ca2-ab0c-a2ad5d700a2e"
replace reenter_teacherid = 5030561 if reenter_teacherid == 5030562 & key == "uuid:0c719191-3786-4ca2-ab0c-a2ad5d700a2e"

//corrected to match the endline teacherid creation protocol 
replace uniqueid = "5030562" if uniqueid == "5030563" & key == "uuid:27851504-02eb-420e-b33f-8b2e4df94fdf"
replace teacherid = 5030562 if teacherid == 5030563 & key == "uuid:27851504-02eb-420e-b33f-8b2e4df94fdf"
replace reenter_teacherid = 5030562 if reenter_teacherid == 5030563 & key == "uuid:27851504-02eb-420e-b33f-8b2e4df94fdf"


//corrected to match the endline teacherid creation protocol
replace uniqueid = "4050352" if uniqueid == "4051022" & key == "uuid:f2619dcd-24b1-4c00-b975-e82d9d15a3be"
replace teacherid = 4050352 if teacherid == 4051022 & key == "uuid:f2619dcd-24b1-4c00-b975-e82d9d15a3be"
replace reenter_teacherid = 4050352 if reenter_teacherid == 4051022 & key == "uuid:f2619dcd-24b1-4c00-b975-e82d9d15a3be"

//corrected to match the endline teacherid creation protocol for GS Gasange
//the baseline teacher was not found and thus, the teacherid started at 2
replace uniqueid = "5031042" if uniqueid == "5032042" & key == "uuid:9971195e-a787-4973-bb21-0b413827980f"
replace teacherid = 5031042 if teacherid == 5032042 & key == "uuid:9971195e-a787-4973-bb21-0b413827980f"
replace reenter_teacherid = 5031042 if reenter_teacherid == 5032042 & key == "uuid:9971195e-a787-4973-bb21-0b413827980f"
replace schoolid = 503104 if schoolid == 503204 & key == "uuid:9971195e-a787-4973-bb21-0b413827980f"
replace reenter_schoolid = 503104 if reenter_schoolid == 503204 & key == "uuid:9971195e-a787-4973-bb21-0b413827980f"


replace uniqueid = "5031043" if uniqueid == "5032043" & key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"
replace teacherid = 5031043 if teacherid == 5032043 & key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"
replace reenter_teacherid = 5031043 if reenter_teacherid == 5032043 & key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"
replace schoolid = 503104 if schoolid == 503204 & key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"
replace reenter_schoolid = 503104 if reenter_schoolid == 503204 & key == "uuid:5830de4b-f5be-438a-ad32-8e0fcb5addea"

save "[directory]/teacher_endline_clean_final.dta", replace

